package likou.jindian;

import java.util.HashMap;
import java.util.Map;

/**
 * @author: 唐小尊
 * @email: 1171702529@qq.com
 * @cate: 2021/03/15 07:13
 */
public class _16_02 {
    Map<String,Integer> map = new HashMap<>();
    public _16_02(String[] book) {
        for(String b:book){
            map.put(b,map.getOrDefault(b,0)+1);
        }
    }

    public int get(String word) {
        return map.getOrDefault(word,0);
    }
}
